Take the scroll arrow into account when drawing the background. (#393166,
authorMatthias Clasen <mclasen@redhat.com>
Fri, 5 Jan 2007 18:24:00 +0000 (18:24 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 5 Jan 2007 18:24:00 +0000 (18:24 +0000)
2007-01-05  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkmenu.c (gtk_menu_paint): Take the scroll arrow into
        account when drawing the background.  (#393166, Benjamin Berg)

svn path=/trunk/; revision=17084

ChangeLog
gtk/gtkmenu.c

index 453924e48010b2391140816918cfa1c88abab8eb..bf3d17ee91985a07a6576229535d4c7a4d716572 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-05  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkmenu.c (gtk_menu_paint): Take the scroll arrow into
+       account when drawing the background.  (#393166, Benjamin Berg)
+
 2007-01-05  Behdad Esfahbod  <behdad@gnome.org>
 
        * gtk/gtklabel.c (get_layout_location): Fix broken width computation,
index 70f9f9b4edcaea86e383dd3b4519b4e07fd3b96a..291f31a9ae2f6671dc19494c438997a8057d26a2 100644 (file)
@@ -2512,12 +2512,17 @@ gtk_menu_paint (GtkWidget      *widget,
     }
   else if (event->window == menu->bin_window)
     {
+      gint y = -border_y + menu->scroll_offset;
+
+      if (menu->upper_arrow_visible && !menu->tearoff_active)
+        y -= scroll_arrow_height;
+
       gtk_paint_box (widget->style,
                     menu->bin_window,
                     GTK_STATE_NORMAL,
                     GTK_SHADOW_OUT,
                     NULL, widget, "menu",
-                    - border_x, menu->scroll_offset - border_y, 
+                    - border_x, y,
                     width, height);
     }
 }